package ${package.SaveDTO};

import com.ozo.easy.common.model.BaseValidDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.*;
import lombok.Data;

<#list savePackages as pkg>
import ${pkg};
</#list>
import java.io.Serializable;

/**
 * ${function}保存对象
 *
 * @author ${author}
 * @version ${version}
 * @date ${date}
 */
@Data
@Schema(description = "${function}保存对象")
public class ${entity}SaveDTO implements Serializable {

    private static final long serialVersionUID = 1L;

<#list fieldList as field>
    <#if field.columnPk>
    <#if field.javaType == 'String'>
    @NotBlank(message = "主键不能为空", groups = BaseValidDTO.Edit.class)
    <#else>
    @NotNull(message = "主键不能为空", groups = BaseValidDTO.Edit.class)
    </#if>
    @Schema(description = "${field.javaFieldComment}")
    private ${field.javaType} ${field.javaField};

    </#if>
</#list>
<#-- ----------  BEGIN 字段循环遍历  ---------->
<#list fieldList as field>
    <#if field.pageForm>
    <#if field.pageFormRequired && !field.columnPk>
    <#if field.javaType == 'String'>
    @NotBlank(message = "${field.javaFieldComment}不能为空")
    <#else>
    @NotNull(message = "${field.javaFieldComment}不能为空")
    </#if>
    </#if>
    @Schema(description = "${field.javaFieldComment}")
    private ${field.javaType} ${field.javaField};

    </#if>
</#list>
<#------------  END 字段循环遍历  ---------->
}
